﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using PureMVC.Interfaces;
using PureMVC.Patterns.Observer;

namespace PureMVC.Patterns.Mediator
{
    public class Mediator : Notifier, IMediator
    {
        public Mediator(string _mediatorName, object _viewCompontent = null)
        {
            MediatorName = _mediatorName ?? Mediator.NAME;
            ViewComponent = _viewCompontent;
        }

        public virtual void HandleNotification(INotification notification)
        {
        }

        public virtual string[] ListNotificationInterests()
        {
            return new string[0];
        }

        public virtual void OnRegister()
        {
        }

        public virtual void OnRemove()
        {
        }

        public static string NAME = "Mediator";
        public string MediatorName { get; protected set; }
        public object ViewComponent { get; set; }
    }
}